/*
 *  读取、转换、保存图片测试,支持格式: bmp、jpg、png
 */
#include <iostream>
#include "util_picture.h"

int main()
{
    Image* image = NULL;
    
    image = UtilPicGet("../../resource/test/cover.bmp");
    if (image)
    {
        UtilPicCreate("./out.bmp", image);
        delete image;
    }
    
    image = UtilPicGet("../../resource/test/cover.bmp", IMAGE_FORMAT_ARGB, 480, 240);
    if (image)
    {
        UtilPicCreate("./out2.png", image);
        delete image;
    }
    
    image = UtilPicGet("../../resource/test/map.jpg");
    if (image)
    {
        UtilPicCreate("./out.jpg", image);
        delete image;
    }
    
    image = UtilPicGet("../../resource/test/signal.png");
    if (image)
    {
        UtilPicCreate("./out.png", image);
        delete image;
    }

    return 0;
}
